find if a given integer is a power of any other integer